function pclapE5 % reads in data from FORTRAN codes for PCGM and CGM clear * clf load p_iterations.txt load iterations.txt load p2_iterations.txt sizeA=iterations(:,1); n_cgm=iterations(:,2); t_cgm=iterations(:,3); n_pcgm2=p_iterations(:,2); t_pcgm2=p_iterations(:,3); n_pcgm1=p2_iterations(:,2); t_pcgm1=p2_iterations(:,3); for i=1:15 t_pcgm1(i)=t_pcgm1(i)/t_cgm(i); t_pcgm2(i)=t_pcgm2(i)/t_cgm(i); end % get(gcf) set(gcf,'Position', [1203 732 515 307]); % plot solution subplot(1,2,1) loglog(sizeA,n_cgm,'k') hold on grid on set(gca,'MinorGridLineStyle','none') axis([1e3 1e6 1e1 1e4]); set(gca,'XTick',[1e3 1e4 1e5 1e6]) loglog(sizeA,n_pcgm1,'-.k') loglog(sizeA,n_pcgm2,'--k') xlabel('Size of A','FontSize',14,'FontWeight','bold') ylabel('Steps','FontSize',14,'FontWeight','bold') set(gca,'FontSize',14); legend(' CGM',' PCGM1',' PCGM2',4); set(findobj(gcf,'tag','legend'),'FontSize',14); subplot(1,2,2) semilogx(sizeA,t_pcgm1,'-.k') axis([1e3 1e6 0.6 1.4001]); hold on grid on set(gca,'MinorGridLineStyle','none') set(gca,'XTick',[1e3 1e4 1e5 1e6]) set(gca,'YTick',[0.6 0.8 1.0 1.2 1.4]) %semilogx(sizeA,t_pcgm1,'-.k') semilogx(sizeA,t_pcgm2,'--k') xlabel('Size of A','FontSize',14,'FontWeight','bold') ylabel('Normalized Time','FontSize',14,'FontWeight','bold') set(gca,'FontSize',14); %legend(' CGM',' PCGM1',' PCGM2',4); %legend(' PCGM1',' PCGM2',4); %set(findobj(gcf,'tag','legend'),'FontSize',14);